/*
 *	Plurals
 *
 *	Author:	S.C.Merrall
 *
 *	File:	mp_dpu_mgmt.m
 *
 *	Contents:	
 *
 *	Description:	This management mechanism allows one to create 
 *			structured collections of PEs. In such structures
 *			data is moved along communicating links between the 
 *			nodes rather than following pointers. The 
 *			constructionist nature of this system requires us to
 *			be able to manipulate the underlying context with
 *			great flexibility. In a strictly functional form 
 *			joining two structures to create a new one will be
 *			sufficient - but as a later stage we will probbaly
 *			want to support destructive updators.
 *
 *	Change History:
 *
 *	Date   Name Comment
 *    -------- ---- -------
 *    26:05:92 SCM  Created
 *
 */

/*  Overview
 *  ========
 *
 *     A structured context cannot (easily) be represented by a set of 
 *  parameters in the same way a rectangle or linear string can. So we
 *  we require some way of indicarting wether a processor is a member of
 *  the context or not, a simple way of doing this is to have a bit on each
 *  PE acting as a flag. We can use slices of the Plural space as we need them
 *  giving us 16 1-bit slices. Obvious management data is:
 */

int strctxt_word = -1;	/* The current plural space slice we are allocating */
int strctxt_bit;	/* words from and the next bit in that word.	    */

/*  When garbage collecting we mark all the plural space as being free and then
 *  unmark those that aren't. If the plural space is going to have a mixture
 *  of strctxt bitmaps and plural handles we can't do this. A bit map of the 
 *  plural space, one bit for each word-slice, can be used to indicate wether
 *  a slice is a strctxt or not.
 */

int strctxt_slices[1024/sizeof(int)]; /* Or Something */

/*  Plural space management will have to interact closely with the strctxt
 *  management system and most operations, in particular - searches, will
 *  need to amine the contents of the strctxt_slices array. This 
 *  suggests some lower level management system with strctxt and alloc_plural
 *  built seperately on top of it.
 */

/*  Another point is we need to free bit slices inorder to resuse them, it
 *  is probably inlikely that we will free all 16-slices making it possible 
 *  to retrieve a whole word slice so this will need to be done on a bit 
 *  level. So as with the plural space. unless there is a GC we know we
 *  can always allocate from the top of the space. At GC time though we
 *  need to reuse any freed slots first, some pointer indicating where
 *  to start searching from will do this neatly enough.
 */



/*----------------------------------------------------------------------------*
 * Function   : function_name
 *
 * Parameters : type name use
 *
 * Description:    What the function does should go here. The problem of 
 *		justification
 *
 * Result     : type name description
 *---------------------------------------------------------------------------*/

#ifdef __STDC__

#else

#endif
